package com.platform.common.spring.intercept;

import org.aopalliance.intercept.MethodInterceptor;
import org.aopalliance.intercept.MethodInvocation;

/**
 * Created with IntelliJ IDEA.
 * User: wangyanginfo
 * Date: 12-10-9
 * Time: 下午5:31
 * To change this template use File | Settings | File Templates.
 */
public class MethodAdvice implements MethodInterceptor {

    /**
     * Implement this method to perform extra treatments before and
     * after the invocation. Polite implementations would certainly
     * like to invoke {@link org.aopalliance.intercept.Joinpoint#proceed()}.
     *
     * @param invocation the method invocation joinpoint
     * @return the result of the call to {@link
     *         org.aopalliance.intercept.Joinpoint#proceed()}, might be intercepted by the
     *         interceptor.
     * @throws Throwable if the interceptors or the
     *                   target-object throws an exception.
     */
    @Override
    public Object invoke(MethodInvocation invocation) throws Throwable {
        Object object = invocation.proceed();
        return object;
    }
}
